package com.acc.mobileappr.util;

import com.acc.mobileappr.entities.TrnMApprRequestEntity;

import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * utility function
 */
public class Util {
    private static SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

    /**
     * print object
     * @param s string object
     */
    public static void print(Object s) {
         String d = formatter.format(new Date()) ;
        System.out.println("INFO\t["+d+"] "+s);
    }

    /**
     * print error object
     * @param s
     */
    public static void error(Object s) {
         String d = formatter.format(new Date()) ;
        System.out.println("\033[1;31mERROR\t["+d+"] "+s+"\033[m");
    }

    public static void success(Object s) {
         String d = formatter.format(new Date()) ;
        System.out.println("\033[1;32mSUCCESS\t["+d+"] "+s+"\033[m");
    }

}
